package com.dilidili;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

/**
 * @Author Miracle GuGuaGuGua
 * @Date 2022/3/31 14:06
 * @Version 1.0
 */
//嘿嘿嘿
//@SpringBootApplication
@EnableAsync
@SpringBootApplication(exclude = {MultipartAutoConfiguration.class})
@MapperScan("com.dilidili.mapper")
@EnableTransactionManagement
public class ESMain9900 {
    public static void main(String[] args) {
        SpringApplication.run(ESMain9900.class, args);
    }

    @Bean("multipartResolver")
    public CommonsMultipartResolver multipartResolver() {
        CommonsMultipartResolver resolver = new CommonsMultipartResolver();
        resolver.setDefaultEncoding("UTF-8");
        resolver.setMaxInMemorySize(30);
        return resolver;
    }

}
